import { computed, ref } from "vue";

export default function InitHook() {
  const tableRef = ref<any>(null);
  const loading = ref<boolean>(false);
  const selectRows = computed<Array<Base.GeneraDataType>>(() => {
    return tableRef.value.getCheckboxRecords() || [];
  });
  const tableData = ref<Array<Base.GeneraDataType>>([]);

  return {
    tableData,
    loading,
    selectRows,
    tableRef
  };
}
